<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateArticleCateTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('articlecates', function (Blueprint $table) {
            //
            $table->id();
            $table->unsignedInteger('pid')->default(null)->comment('父级id');
            $table->string('name',100)->default(null)->comment('名称');
            $table->timestamps(0);

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('articlecates', function (Blueprint $table) {
            //
        });
    }
}
